import os
import sys

# 添加当前项目路径到环境变量
root_path = os.path.dirname(os.path.abspath(__file__))
sys.path.append(root_path)


def pytes_collection_modifyitems(items):
    """
    测试用例收集完成时，将收集到的item的name和nodeid的中文显示
    :param items:
    :return:
    """
    for item in items:
        item.name = item.name.encode('utf-8').decode('unicode_escape')
        item._nodeid = item.nodeid.encode('utf-8').decode('unicode_escape')
